From: Florian Müllner Date: Fri, 5 Aug 2022 11:21:26 +0000 (+0200) Subject: status/network: Emit 'icon-changed' on primary connection changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~142 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ca2d39f6fb7c7265f5b3f87fd685174a55192701;p=gnome-shell.git status/network: Emit 'icon-changed' on primary connection changes When deciding on whether to show the 'no-route' icon, we check for the client's connectivity *and* whether the devices's active connection is used as primary connection. This is currently masked by the indicator updating the icon on connection changes anyway, but items should still notify the change themselves. Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index d6cad5624..0ae423b68 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -337,6 +337,10 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection { this._autoConnectItem = this.item.menu.addAction(_("Connect"), this._autoConnect.bind(this)); this._deactivateItem = this._radioSection.addAction(_("Turn Off"), this.deactivateConnection.bind(this)); + this._client.connectObject( + 'notify::primary-connection', () => this._iconChanged(), + this); + this._device.connectObject( 'state-changed', this._deviceStateChanged.bind(this), 'notify::active-connection', this._activeConnectionChanged.bind(this), @@ -1267,7 +1271,9 @@ var NMDeviceWireless = class extends Signals.EventEmitter { this._client.connectObject( 'notify::wireless-enabled', this._sync.bind(this), 'notify::wireless-hardware-enabled', this._sync.bind(this), - 'notify::connectivity', this._iconChanged.bind(this), this); + 'notify::connectivity', () => this._iconChanged(), + 'notify::primary-connection', () => this._iconChanged(), + this); this._device.connectObject( 'notify::active-access-point', this._activeApChanged.bind(this),